/*    */ package com.lmpop.createIndex.search;
/*    */ 
/*    */ import com.lmpop.createIndex.searchModel.Queue;
/*    */ import com.lmpop.createIndex.searchModel.QueueValue;
/*    */ import com.lmpop.createIndex.searchModel.SearchData;
/*    */ import com.lmpop.createIndex.searchModel.SearchModel;
/*    */ import java.io.IOException;
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class CompanyIndexFiles
/*    */ {
/*    */   public ProperUtil properUtil;
/*    */   private String file_path;
/*    */ 
/*    */   public CompanyIndexFiles()
/*    */   {
/* 21 */     this.properUtil = new ProperUtil();
/* 22 */     this.file_path = this.properUtil.getFilePathByModel("company");
/*    */   }
/*    */ 
/*    */   public List getCompanyInfo(Map paraMap) throws IOException {
/* 26 */     ArrayList showList = new ArrayList();
/* 27 */     SearchData search = new SearchData();
/* 28 */     ArrayList paraList = new ArrayList();
/*    */ 
/* 30 */     String cat_id = ""; String keyword = ""; String state_code = ""; String search_date = ""; String orderby = "in_date";
/* 31 */     String cust_name_check = ""; String contact_name_check = ""; String main_product_check = ""; String cust_type = "";
/* 32 */     String e = ""; String f = ""; String g = ""; String area_attr = ""; String company_type = ""; String cust_id = ""; String user_class = "";
/* 33 */     if (paraMap.get("cat_id") != null) cat_id = paraMap.get("cat_id").toString();
/* 34 */     if (paraMap.get("user_class") != null) user_class = paraMap.get("user_class").toString();
/* 35 */     if (paraMap.get("cust_id") != null) cust_id = paraMap.get("cust_id").toString();
/* 36 */     if (paraMap.get("cust_type") != null) cust_type = paraMap.get("cust_type").toString();
/* 37 */     if (paraMap.get("company_type") != null) company_type = paraMap.get("company_type").toString();
/* 38 */     if (paraMap.get("area_attr") != null) area_attr = paraMap.get("area_attr").toString();
/* 39 */     if (paraMap.get("e") != null) e = paraMap.get("e").toString();
/* 40 */     if (paraMap.get("f") != null) f = paraMap.get("f").toString();
/* 41 */     if (paraMap.get("g") != null) g = paraMap.get("g").toString();
/* 42 */     if (paraMap.get("state_code") != null) state_code = paraMap.get("state_code").toString();
/* 43 */     if (paraMap.get("keyword") != null) keyword = paraMap.get("keyword").toString();
/* 44 */     if (paraMap.get("orderby") != null) orderby = paraMap.get("orderby").toString();
/*    */ 
/* 46 */     if (paraMap.get("cust_name_check") != null) cust_name_check = paraMap.get("cust_name_check").toString();
/* 47 */     if (paraMap.get("contact_name_check") != null) contact_name_check = paraMap.get("contact_name_check").toString();
/* 48 */     if (paraMap.get("main_product_check") != null) main_product_check = paraMap.get("main_product_check").toString();
/*    */ 
/* 51 */     Queue queue = new Queue(new QueueValue[] { new QueueValue(orderby, 2, true) });
/*    */ 
/* 53 */     if (cust_name_check.equals("1")) paraList.add(new SearchModel("0", "cust_name", keyword));
/* 54 */     if (contact_name_check.equals("1")) paraList.add(new SearchModel("0", "contact_name", keyword));
/* 55 */     if (main_product_check.equals("1")) paraList.add(new SearchModel("0", "main_product", keyword));
/* 56 */     paraList.add(new SearchModel("0", "cust_id", cust_id));
/* 57 */     paraList.add(new SearchModel("0", "user_class", user_class));
/* 58 */     paraList.add(new SearchModel("0", "cust_type", cust_type));
/* 59 */     paraList.add(new SearchModel("0", "class_attr", cat_id));
/* 60 */     paraList.add(new SearchModel("0", "company_type", company_type));
/* 61 */     paraList.add(new SearchModel("2", area_attr, new String[] { "title", "area_attr" }));
/* 62 */     paraList.add(new SearchModel("0", "e", e));
/* 63 */     paraList.add(new SearchModel("0", "f", f));
/* 64 */     paraList.add(new SearchModel("0", "g", g));
/* 65 */     paraList.add(new SearchModel("0", "state_code", state_code));
/* 66 */     paraList.add(new SearchModel("2", keyword, new String[] { "cust_name", "company_key" }));
/* 67 */     showList = search.getSearchInfo(this.file_path, paraList, queue);
/* 68 */     return showList;
/*    */   }
/*    */ 
/*    */   public Map getCustNameById(String cust_id) throws IOException
/*    */   {
/* 73 */     if (cust_id.equals("")) return null;
/* 74 */     SearchData search = new SearchData();
/* 75 */     ArrayList paraList = new ArrayList();
/* 76 */     paraList.add(new SearchModel("0", "cust_id", cust_id));
/* 77 */     return search.getSearchObject(this.file_path, paraList);
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.createIndex.search.CompanyIndexFiles
 * JD-Core Version:    0.6.0
 */